;**
;**       BRIEF -- Basic Reconfigurable Interactive Editing Facility
;**
;**		Written by Dave Nanian and Michael Strickman.
;**
;**
;**		ws.m:
;**
;**	insert an include ws.m in the startup file.
;**   moves cursor over virtual areas (over tabs and to EOL and BOL) when
;**   cursor arrow keys are pressed
;**   
;**    cntrl w writes buffer
;**    cntrl x exits
;**    cntrl z performs dos call
;**    cntrl y deletes line
;** basicly the 'alt' codes were changed to 'cntrl' codes
;
;
;             tim purves 06/20/85
;

(macro wsup
	(
		(up)
		(next_char)
		(prev_char)
	)
)

(macro wsdown
	(
		(down)
		(prev_char)
		(next_char)
	)
)

(macro wsfwd
	(next_char)
)

(macro wsback
	(prev_char)
)

(macro mark_pos
	(save_position)
)

(macro res_pos
	(restore_position 1)
)


(macro sample
	(
		;** Set up the key assignments.  If you want to assign to keys other
		;** than those shown here, use the "key" macro to find the appropriate 
		;** key codes.

		(assign_to_key "#23" "write_buffer")
		(assign_to_key "#5" "edit_file")
		(assign_to_key "#18" "read_file")
		(assign_to_key "%#64" "translate")
		(assign_to_key "#21" "undo")
		(assign_to_key "#22" "insert_mode")
		(assign_to_key "%#24" "output_file")
		(assign_to_key "#16" "print")
		(assign_to_key "#1" "mark")
		(assign_to_key "%#31" "search_fwd")
		(assign_to_key "#25" "delete_line")
		(assign_to_key "%#34" "goto_line")
		(assign_to_key "#17" "delete_to_eol")
		(assign_to_key "#26" "dos")
		(assign_to_key "#24" "exit")
		(assign_to_key "%#46" "search_case")
		(assign_to_key "%#47" "version")
		(assign_to_key "%#50" "mark")
		(assign_to_key "#14" "change_window")
		(assign_to_key "%#60" "move_edge")
		(assign_to_key "%#61" "create_edge")
		(assign_to_key "%#62" "delete_edge")
		(assign_to_key "%#63" "search_fwd")
		(assign_to_key "%#64" "translate")
		(assign_to_key "%#65" "remember")
		(assign_to_key "%#66" "playback")
		(assign_to_key "%#67" "load_macro")
		(assign_to_key "%#68" "execute_macro")
		(assign_to_key "%#71" "top_of_window")
		(assign_to_key "%#72" "wsup")
		(assign_to_key "%#73" "page_up")
		(assign_to_key "%#75" "wsback")
		(assign_to_key "%#77" "wsfwd")
		(assign_to_key "%#79" "end_of_window")
		(assign_to_key "%#80" "wsdown")
		(assign_to_key "%#81" "page_down")
		(assign_to_key "%#82" "paste")
		(assign_to_key "%#88" "search_back")
		(assign_to_key "%#117" "end_of_buffer")
		(assign_to_key "%#118" "end_of_line")
		(assign_to_key "%#119" "top_of_buffer")
		(assign_to_key "%#132" "beginning_of_line")
		(assign_to_key "#14122" "undo")
		(assign_to_key "#18989" "cut")
		(assign_to_key "#20011" "copy")
		(assign_to_key "%#104" "mark_pos")
		(assign_to_key "%#105" "res_pos")
		(assign_to_key "#7" "delete_char")
	)
)
opy")
		(assign_to_key "%#104" "mark_pos")
		(assign_to_key "%#105" "res_pos")
		(assign_to_key "#7" "delete